<template>
  <div class="swiper">
<van-swipe class="my-swipe" :autoplay="2000" indicator-color="white">
  <van-swipe-item v-for="(v,i) in arr" :key="i"><img :src="v.imgurl" alt=""></van-swipe-item>
  
</van-swipe>

  </div>
</template>

<script>
import getlink from '../api/getlink.js'
export default {
data() {
    return {
      current: 0,
      arr:[]
    };
  },
  methods: {
    onChange(index) {
      this.current = index;
    },
  },
  created(){
    getlink("/data/list/xiaoming").then((ok)=>{
      this.arr=ok.data.swiper
    })
  }
}
</script>

<style scoped>
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    height: 1.8rem;
    line-height: 150px;
    text-align: center;
  }
img{
    width: 100%;
    height: 1.8rem;
}
</style>